function backHome() {
    jQuery.jCookie("hiconIndex", "false"), jQuery.jCookie("tabbarIndex", "false");
}

function createIconMenu(a) {
    var e, f, g, h, i, j, b = $(".nav_icon_h"), c = $(".tab_bar_content"), d = -1;
    if (a.maxlength && (d = parseInt(a.maxlength)), e = a.list.length, $.each(a.list, function(a, g) {
        var h, i, j, k, l, m, n, o;
        -1 == d || d > a ? (i = $('<div class="nav_icon_h_item"><a><div class="nav_icon_h_item_img"><img/></div><div class="nav_icon_h_item_text"></div></a></div>'), 
        h = i.find("a"), g.link && h.attr("href", g.link), g.target && h.attr("target", g.target), 
        g.name && i.find(".nav_icon_h_item_text").text(g.name), g.icon && i.find("img").attr("src", g.icon), 
        b.append(i)) : (a == d && (f = $('<div class="nav_icon_more"><a class="nav_icon_more_normal"></a><div class="iconmenu" style="right:0px;display:none;"><div class="iconmenu_top"></div><div class="iconmenu_middle"><div class="iconmenu_middle_con"></div></div><div class="iconmenu_bottom"></div></div></div>'), 
        b.append(f), f.hover(function() {
            $(this).find(".iconmenu").show(), $(this).find(".nav_icon_more_normal").addClass("nav_icon_more_current"), 
            mouseOn = 1;
        }, function() {
            mouseOn = 0, setTimeout(function() {
                0 == mouseOn && (f.find(".iconmenu").hide(), f.find(".nav_icon_more_normal").removeClass("nav_icon_more_current"));
            }, 500);
        })), j = f.find(".iconmenu_middle_con"), k = $('<div class="nav_icon_h_item"><a><div class="nav_icon_h_item_img"><img/></div><div class="nav_icon_h_item_text2"></div></a></div>'), 
        h = k.find("a"), g.link && h.attr("href", g.link), g.target && h.attr("target", g.target), 
        g.name && k.find(".nav_icon_h_item_text2").text(g.name), g.icon && k.find("img").attr("src", g.icon), 
        j.append(k), a == e - 1 && j.append('<div class="clear"></div>')), g.id && (h.attr("id", g.id), 
        g.clickHandler && (1 == g.clickHandler || "true" == g.clickHandler) && h.click(function() {
            changeLeftMenu(g.id, g.name);
        })), g.children && (l = -1, g.maxnum && (l = parseInt(g.maxnum)), m = $('<ul style="display:none;"></ul>'), 
        c.append(m), n = $('<li class="popupMenu nav_more"><div class="popupMenu_link nav_more_link"></div><div class="popupMenu_con white_con nav_more_con"></div></li>'), 
        o = 0, $.each(g.children, function(a, b) {
            var c, d, e;
            -1 == l || l > a ? (c = $('<li class="item"><a></a></li>'), d = c.find("a"), b.name && d.text(b.name), 
            b.link && d.attr("href", b.link), b.target && d.attr("target", b.target), m.append(c), 
            b.id && (d.attr("id", b.id), b.clickHandler && (1 == b.clickHandler || "true" == b.clickHandler) && c.click(function() {
                changeLeftMenu(b.id, b.name);
            }))) : (o = 1, e = $("<a><span></span></a>"), b.name && e.find("span").text(b.name), 
            b.link && e.attr("href", b.link), b.target && e.attr("target", b.target), n.find(">div").eq(1).append(e), 
            b.id && (e.attr("id", b.id), b.clickHandler && (1 == b.clickHandler || "true" == b.clickHandler) && e.click(function() {
                changeLeftMenu(b.id, b.name);
            })));
        }), 1 == o && (m.append(n), n.popupMenuRender()), m.append('<div class="clear"></div>'), 
        c.append(m));
    }), b.append('<div class="clear"></div>'), g = 0, h = jQuery.jCookie("hiconIndex"), 
    "false" == h || (g = parseInt(h), isNaN(g) && (g = 0)), $(".tab_bar_content >ul").eq(g).show(), 
    $(".nav_icon_h_item >a").each(function(b) {
        if ($(this).click(function() {
            $(".nav_icon_h_item >a").removeClass("current"), $(this).addClass("current"), $(".tab_bar_content >ul").hide(), 
            $(".tab_bar_content >ul").eq(b).show(), jQuery.jCookie("hiconIndex", b.toString());
        }), b == g) if ("single" == a.type) {
            $(this).addClass("current");
            var c = $(this).attr("id");
            currentPid = c;
        } else $(this).addClass("current");
    }), i = -1, j = jQuery.jCookie("tabbarIndex"), "false" == j) try {} catch (k) {} else i = parseInt(j), 
    isNaN(i) && (i = 0);
    $(".tab_bar_content li a").each(function(a) {
        if ($(this).click(function() {
            if ($(".tab_bar_content li a").removeClass("current"), $(this).addClass("current"), 
            null != $(this).attr("target")) {
                var b = "正在加载中...";
                progressFlag = 2, showSimpleProgress(b, 0, !0, "#ffffff");
            }
            jQuery.jCookie("tabbarIndex", a.toString());
        }), a == i) {
            $(this).addClass("current");
            var b = $(this).attr("id");
            try {
                listData = getListData(b, $(this).text());
            } catch (c) {}
            try {} catch (c) {}
        }
    });
}

function changeLeftMenu(a) {
    var c = getTreeData(a);
    document.getElementById("frmleft").contentWindow.initTreeMenu(c);
}

var listData, mouseOn = 0, currentPid = null;